package com.pethome.web.service.impl;

import com.pethome.web.domain.Visit;
import com.pethome.web.mapper.VisitMapper;
import com.pethome.web.service.IVisitService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 回访信息Service业务层处理
 * 
 * @author hjc
 * @date 2024-08-26
 */
@Service
public class VisitServiceImpl implements IVisitService 
{
    @Autowired
    private VisitMapper visitMapper;

    /**
     * 查询回访信息
     * 
     * @param visitId 回访信息主键
     * @return 回访信息
     */
    @Override
    public Visit selectVisitByVisitId(Long visitId)
    {
        return visitMapper.selectVisitByVisitId(visitId);
    }

    /**
     * 查询回访信息列表
     * 
     * @param visit 回访信息
     * @return 回访信息
     */
    @Override
    public List<Visit> selectVisitList(Visit visit)
    {
        return visitMapper.selectVisitList(visit);
    }

    /**
     * 新增回访信息
     * 
     * @param visit 回访信息
     * @return 结果
     */
    @Override
    public int insertVisit(Visit visit)
    {
        return visitMapper.insertVisit(visit);
    }

    /**
     * 修改回访信息
     * 
     * @param visit 回访信息
     * @return 结果
     */
    @Override
    public int updateVisit(Visit visit)
    {
        return visitMapper.updateVisit(visit);
    }

    /**
     * 批量删除回访信息
     * 
     * @param visitIds 需要删除的回访信息主键
     * @return 结果
     */
    @Override
    public int deleteVisitByVisitIds(Long[] visitIds)
    {
        return visitMapper.deleteVisitByVisitIds(visitIds);
    }

    /**
     * 删除回访信息信息
     * 
     * @param visitId 回访信息主键
     * @return 结果
     */
    @Override
    public int deleteVisitByVisitId(Long visitId)
    {
        return visitMapper.deleteVisitByVisitId(visitId);
    }
}
